Skip to main content

ERC 4337 : Account Abstraction

Account Abstraction (ERC-4337) is a framework that allows smart contract wallets to act like regular user accounts (EOAs) by removing the need for private keys and enabling powerful programmable features.

Alt text

Transaction Flow in ERC-4337

  1. Initiation: A user creates a UserOperation, specifying their transaction intent (e.g., transferring tokens).
  2. Bundling: A Bundler collects this UserOperation, along with others, and batches them into a single transaction.
  3. Submission: The Bundler submits the batched transaction to the EntryPoint smart contract on the blockchain.
  4. Verification: The EntryPoint verifies the UserOperations, using an Aggregator (if applicable) to validate signatures efficiently.
  5. Execution: The EntryPoint forwards each valid UserOperation to the corresponding Smart Contract Account.
  6. Gas Handling: If a Paymaster is involved, it handles gas payment (e.g., sponsoring fees or accepting alternative tokens).
  7. Completion: The Smart Contract Account executes the UserOperation, completing the user’s intended action.

Advantages of ERC-4337 Account Abstraction

  • Gasless Transactions: Paymasters allow users to interact without holding crypto assets for gas, as fees can be sponsored or paid in other tokens, enhancing accessibility.

  • Improved User Experience: Users can use smart contract wallets with custom logic (e.g., social recovery, spending limits), eliminating the need for EOAs and seed phrases.

  • Transaction Efficiency: Bundlers batch multiple UserOperations, reducing gas costs and network congestion, while Aggregators streamline signature validation.